<%@ page pageEncoding="utf-8" %>
<%@include file="/commons/taglibs.jsp" %>
<!DOCTYPE html>
<html>
<fmt:bundle basename="res">
<head>
    <meta charset="utf-8">
    <title><fmt:message key='jssz'/></title>
    <jsp:include page="/WEB-INF/commons/commons-header.jsp" flush="true"/>
    <style>
        html {
            background: #fff;
        }

        .layui-form-label {
            width: 150px;
        }

        .layui-input-block {
            margin-left: 180px;
        }

        h3 {
            margin-top: 20px;
            margin-bottom: 20px;
            font-weight: bold;
        }
    </style>
</head>

<body>

<div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
    <ul class="layui-tab-title">
        <li class="layui-this"><fmt:message key='jssz'/></li>
    </ul>
    <div class="layui-tab-content" style="height: 100%;">
        <div class="layui-tab-item layui-show">
            <div class="layui-container">
                <div class="layui-form" lay-filter="layuiadmin-app-form-list" id="layuiadmin-app-form-list" style="padding: 20px 30px 0 0;">
                    <form:form commandName="setting" method="post" action="${web_domain}/mall/live/setting/modify">

                        <input type="hidden" name="_method" value="PUT">
                        <form:hidden path="id"/>

                        <h3><fmt:message key='txtj'/></h3>

                        <div class="layui-form-item">
                            <label class="layui-form-label"><fmt:message key='dbtxjebdy'/></label>
                            <div class="layui-inline">
                                <div class="layui-input-inline">
                                    <input type="number" min="0" class="layui-input" name="minPrice" value="${setting.minPrice}">
                                </div>
                                <div class="layui-form-mid"><fmt:message key='y'/></div>
                            </div>
                        </div>

                        <div class="layui-form-item">
                            <label class="layui-form-label"><fmt:message key='dbtxjebgy'/></label>
                            <div class="layui-inline">
                                <div class="layui-input-inline">
                                    <input type="text" class="layui-input" name="maxPrice" value="${setting.maxPrice}">
                                </div>
                                <div class="layui-form-mid"><fmt:message key='y'/></div>
                            </div>
                        </div>

                        <div class="layui-form-item">
                            <label class="layui-form-label"><fmt:message key='mtktxcs'/></label>
                            <div class="layui-inline">
                                <div class="layui-input-inline">
                                    <input type="text" class="layui-input" name="withdrawNumPerDay" value="${setting.withdrawNumPerDay}">
                                </div>
                                <div class="layui-form-mid"><fmt:message key='c'/></div>
                            </div>
                        </div>

                        <div class="layui-form-item">
                            <label class="layui-form-label"><fmt:message key='myktxcs'/></label>
                            <div class="layui-inline">
                                <div class="layui-input-inline">
                                    <input type="text" class="layui-input" name="withdrawNumPerMonth" value="${setting.withdrawNumPerMonth}">
                                </div>
                                <div class="layui-form-mid"><fmt:message key='c'/></div>
                            </div>
                        </div>


                        <h3><fmt:message key='yjfcsj'/></h3>

                        <div class="layui-form-item">
                            <label class="layui-form-label"><fmt:message key='dhyqrshhd'/></label>
                            <div class="layui-inline">
                                <div class="layui-input-inline">
                                    <input type="text" class="layui-input" name="distributionDuration" value="${setting.distributionDuration}">
                                </div>
                                <div class="layui-form-mid"><fmt:message key='t'/></div>
                            </div>
                        </div>

                        <div class="layui-form-item">
                            <label class="layui-form-label"><fmt:message key='yjzffs'/></label>
                            <div class="layui-input-block">
                                <input type="radio" title="<fmt:message key='wx'/>" name="commissionPayType" value="1" <c:if test="${setting.commissionPayType eq 1}">checked</c:if>>
                                <input type="radio" title="<fmt:message key='yhzz'/>" name="commissionPayType" value="2" <c:if test="${setting.commissionPayType eq 2}">checked</c:if>>
                            </div>
                        </div>

                        <div class="layui-form-item">
                            <label class="layui-form-label"></label>
                            <div class="layui-input-inline">
                                <input type="button" value="<fmt:message key='qd'/>" id="submit" class="layui-btn">
                            </div>
                        </div>

                    </form:form>
                </div>
            </div>
        </div>
    </div>
</div>

<script>

    layui.use(['form', 'layer'], function () {

        var layer = layui.layer;

        $("#submit").click(function () {

            $("#setting").ajaxSubmit({
                success: function (res) {
                    if (res.status) {
                        layer.msg("<fmt:message key='bccg'/>");
                    } else {
                        layer.alert(res.message);
                    }
                }
            });
        });

    });

</script>
</body>
</fmt:bundle>
</html>